# -*- coding: UTF-8 -*-
import json
from decimal import Decimal

# print "%0.8f" % 100

# print isinstance(('%0.8f' % Decimal(1002.0001)).rstrip("0").rstrip("."), str)
#
# print '%0.8f' % Decimal(1002.0001)

# print round(370280156/1000000, 6)
UTXO_COIN_TYPE = ("ltc", "btc", "bcc", 'btg', 'sbtc', 'ubtc', 'bcd', 'doge')
print "btc" in UTXO_COIN_TYPE
print Decimal(0) / Decimal(1000000)
# print (format(Decimal(370280156) / Decimal(1000000), '.6f'))

# print str(Decimal(1002.0001)).rstrip("0").rstrip(".")
#
# r1 = '{"code": "TAPOS_ERROR","message": "5461706f7320636865636b206572726f72", "testNode":{"a":"A"}}'
# r2 = '{"status": true}'
#
# r1json = json.loads(r1)
# r2json = json.loads(r2)
# if r1json["testNode"] and 'a' in r1json["testNode"].keys():
#     print 1
# else:
#     print 2
# print r1json.keys()
# print not r1json["testNode"]
# print 'code' in r1json.keys()
